void main() {
  List list = [1, 2, 3, 4, 5];
  list.forEach((element) {
    print(element);
  });

  //字典泛型 注意 dart 不支持联合类型
  Map<String, String> map = {"name": "张三", "age": '18', "job": "程序员"};
  map.forEach((key, value) {
    print("$key:$value");
  });

  print(demo(123).toDouble());
  print(demo("hello"));
  print(demo(true));
}

// 泛型
T demo<T>(T value) {
  return value;
}
